@import '../common/icons.scss';
@import '../common/common.scss';

header{
    background: #fff;
    height:.44rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 99;
    >a{
        background: #F5F5F5;
        flex:9;
        height:.3rem;
        border-radius: .2rem;
        margin:0 .2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0.02rem 0.05rem rgba(0,0,0,.05) inset;
        *{color:$mainColor;}
        >img{height:.15rem;margin-right: .1rem;}
    }
    >span{
        flex:1;
        img{height:.17rem;}
    }
    .menu{
        display: block;
        height:100%;
        width:85%;
        position: fixed;
        left:100%;
        right:0;
        top:0;
        z-index:99;
        background: #fff;
        .search{
            height:.44rem;
            display: flex;
            align-items: center;
            @include border(0 0 1px 0,#eee);
            .search-main{
                flex:4;
                padding:0 .2rem;
                display: flex;
                position: relative;
                input{
                    padding-left:.3rem;
                    width:100%;
                    height:.3rem;
                    border: 0;
                    background: #F5F5F5;
                    border-radius: .2rem;
                    box-shadow: 0 0.02rem 0.05rem rgba(0,0,0,.05) inset;
                }
                *{color:$mainColor;}
                >img{
                    position: absolute;
                    top:24%;
                    left:10%;
                    height:.15rem;
                    margin-right: .1rem;
                }
            }
            .search-now{
                flex:1;
                text-align: center;
            }
        }
        .menu-list{
            height:100%;
            color:#666;
            >li{
                width: 100%;
                min-height:.44rem;
                line-height: .44rem;
                @include border(0 0 1px 0,#eee);
                i{ 
                    margin-left: .1rem;
                }
                span{
                    float: right;
                    margin-right: .1rem;
                    font-size: 9px;
                    color:#eee;
                }
                >ul{
                    display: none;
                    >li{
                        height:.44rem;
                        background: #f5f5f5;
                        @include border(0 0 1px 0,#fff);
                        padding-left:.2rem;
                    }
                }
            }
        }
    }
}
#home-nav{
    background: #fff;
    height:.44rem;
    line-height:.44rem;
    width:100%;
    overflow-x:scroll;
    position: relative;
    z-index: 98;
    >ul{
        height: 100%;
        white-space: nowrap;
        display: flex;
        >li{
            height: 100%;
            padding:0 .2rem;
            @include border(1px 0 1px 0,#eee);
            >a{
                height: 100%;
                display: block;
                color: #666;
            }
        }
        >.active{
            >a{
                color: $linkColor;
                border-bottom: 3px solid $linkColor;
            }
        }
    }
}
#home-list{
    height: calc(100% - 1.32rem);
    .arrow{
        display: flex;
        justify-content: center;
        align-items: center;
        width:100%;
        height: .4rem;
        img{
            width:25px;
            height:25px;
            transition: .3s;
        }
        .up{
            transform:rotate(180deg);
        }
        .down{
            transform:rotate(0deg);
        }
    }
    .tab-title{
        background: #fff;
        height:.44rem;
        display: flex;
        align-items: center;
        color:#666;
        @include border(0 0 1px 0,#eee);
        // border-top:1px solid #eee;
        >span{
            text-align: center;
            flex: 1;
        }
        >.active{
            color: $linkColor;
        }
    }
    .goods-list{
        height: auto;
        .goods-item{
            background: #fff;
            display: block;
            width: 100%;
            height:1.3rem;
            margin-bottom:.08rem;
            &:last-child{
                margin-bottom:0;
            }
            .goods-main{
                height:100%;
                display: flex;
                position: relative;
                img{
                    height: 100%;
                }
                .goods-desc{
                    position: absolute;
                    top:0;
                    left: 1.6rem;   
                    padding-right:.1rem;  
                    .goods-title{
                        margin-top: 0.13rem;
                        margin-bottom: 0.4rem;
                        color: #333;
                        font-size: 13px;
                        line-height: 17px;
                        //文字超出三行隐藏
                        overflow:hidden;
                        text-overflow:ellipsis;
                        display:-webkit-box;
                        -webkit-line-clamp:2;
                        -webkit-box-orient:vertical;
                    }
                    .goods-price{
                        display: flex;
                        align-items: flex-end;
                        font-size: 12px;
                        line-height: 12px;
                        margin-left:-3px;
                        .new-price{
                            color:$linkColor;
                            margin-right: .05rem;
                            span{
                                font-size: 20px;
                            }
                        }
                        .old-price{
                            color:$mainColor;
                            text-decoration: line-through;
                        }
                    }  
                    .goods-rate{
                        margin-top:.03rem;
                        font-size: 11px;
                        color:$mainColor;
                    }        
                }
            }
        }
    }
}